from .SmsSDK import SmsSDK
from django.conf import settings
import json


accId = settings.SMS_INFO.get('ACCID')
accToken = settings.SMS_INFO.get('ACCTOKEN')
appId = settings.SMS_INFO.get('APPID')

def send_message(tid, mobile, datas):
	sdk = SmsSDK(accId, accToken, appId)
	'''
	tid = '1'
	mobile = '18500419869'
	datas = ('1234', '3')
	'''
	resp = sdk.sendMessage(tid, mobile, datas)
	resp = json.loads(resp)
	print(resp)
	return resp.get('statusCode') == '000000'

# send_message()